<template>
  <h1>父组件111</h1>
  <hr/>
  <div>
    <child :message="parentMessage" @message-sent="handleMessage"></child>
  </div>
</template>

<script setup>
import child from './child.vue';
const parentMessage = '红红火火恍恍惚惚';
function handleMessage(message) {
  console.log('接收到了子组件的消息:', message);
}
</script>